feat: add broken link reporting workflow to 404 page#7843
Conversation
Signed-off-by: ananyaa <dk80655@gmail.com>
|
🚀 Preview deployment: https://layer5.io/pr-preview/pr-7843/
|
Signed-off-by: ananyaa <dk80655@gmail.com>
There was a problem hiding this comment.
Great work on the implementation, the broken link reporting flow works really well! One small thing. The three buttons on the 404 page look a bit uneven in sizing. Could we make sure they're all consistently sized so the layout feels balanced or make it better?
@Oluwatunmise-olat Thanks for the feedback! I've updated the button styling to ensure all three actions have consistent sizing while preserving the existing column layout. The latest changes have been pushed and the updated preview/screenshots are available for review.
|
Signed-off-by: ananyaa <dk80655@gmail.com>
|
@ananyaa0518 Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂 |
Is there any reason why the nav bar is duplicated? |
|
Thanks for catching that! The duplicated navbar is only appearing in my local environment and doesn't show up in the deployed preview. |
KhushamBansal
left a comment
There was a problem hiding this comment.
One potential concern: if a user lands on the 404 page because they manually entered a URL with a typo, the Report Broken Link option would still be available.
|
@KhushamBansal Thanks for bringing that up! I can think of two possible approaches here:
Which approach would you prefer, or do you have another approach in mind? |
|
@ananyaa0518 I would prefer 2nd approach. |
|
@Oluwatunmise-olat @KhushamBansal Great, thanks for the clarification! I'll implement the second approach and update the PR. |
Signed-off-by: ananyaa <dk80655@gmail.com>
|
I've updated the implementation to address this case. Now, if document.referrer is empty, users are shown a confirmation dialog reminding them to verify that they didn't manually enter the URL before proceeding with the broken link report. If they confirm, the existing reporting flow continues as before. I've also updated the demo/screenshots in the PR. Please take a look when you have a chance. |


Description
This PR fixes #7832 by adding a "Report Broken Link" action to the 404 page.
Changes introduced
window.location.href(broken URL)document.referrer(referrer information)navigator.userAgent(browser information)bug_report.mdissue template to keep reporting consistent with the repository's workflow.document.referreris empty, prompting users to verify they didn't manually enter the URL before continuing with the report.This enhancement enables visitors to report unknown 404s originating from stale external links, cached search results, and legacy campaigns while helping reduce reports caused by manually entered URLs.
Notes for Reviewers
Verification
document.referreris empty and that the report proceeds only after user confirmation.before
after
Demo
Screen.Recording.2026-07-11.at.8.47.59.AM.mov
Signed commits